Typechecking Polymorphism in Emerald
نویسنده
چکیده
Emerald is a statically typed object-oriented language that was originally intended for programming distributed subsystems and applications [Jul 88]. It is important that such systems be dynamically extensible, i.e., that it be possible to introduce new kinds of entities into the system without re-compiling or re-linking the whole system. This led us to devise a type system based on the notion of type conformity rather than type equality. We also felt that polymorphism was a necessary feature of a modern programming language: programmers should be able to de ne generic abstractions like homogeneous sets, lists and les into which objects of arbitrary type can be placed. The combination of object-orientation, type-checking based on conformity and polymorphism gave rise to some interesting problems when designing Emerald's type system. This paper describes the Emerald's type-checking mechanism and the notion of types and parameterization on which it is based.
منابع مشابه
Dismissing the \Final Concern" or Matches Rides Again A Position Paper for the ANSA workshop on F-bounded quanti cation
The F-bounding condition is de ned by Canning et al. [Canning 89] as t F [t], where is the subtyping relation and F [t] is an expression, generally containing the type variable t. Because Canning's work is proof theoretic, this essentially syntactic de nition is natural. In our technical report \Typechecking Polymorphism in Emerald", Hutchinson and I de ne the relation . (read matches) used to ...
متن کاملEmerald : A General - Purpose Programming
SUMMARY Emerald is a general-purpose language with aspects of traditional object-oriented languages, such as Smalltalk, and abstract data type languages, such as Modula-2 and Ada. It is strongly-typed with a non-traditional object model and type system that emphasize abstract types, allow separation of typing and implementation, and provide the exibility of polymorphism and subtyp-ing with comp...
متن کاملBidirectional polymorphism through greed and unions
Bidirectional typechecking has become popular in advanced type systems because it works in many situations where inference is undecidable. In this paper, I show how to cleanly handle parametric polymorphism in a bidirectional setting, even in the presence of subtyping. The first contribution is a bidirectional type system that supports first-class (higher-rank and impredicative) polymorphism bu...
متن کاملPerformance polymorphism
In an interactive functional programming environment with a Milner-style polymorphic type system (Milner 1978), a modification to one definition may imply changes in the types of other definitions. A polymorphic typechecker must carry out some re-typechecking to determine all of these changes. This paper presents a new typechecking algorithm which performs fine-grained re-typechecking based on ...
متن کاملSound and Complete Bidirectional Typechecking for Higher-Rank Polymorphism and Indexed Types: Lemmas and Proofs
B Properties of the Declarative System 23 1 Lemma (Declarative Weakening) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 2 Lemma (Declarative Term Substitution) . . . . . . . . . . . . . . . . . . . . . . . . 23 3 Lemma (Reflexivity of Declarative Subtyping) . . . . . . . . . . . . . . . . . . . . . 23 4 Lemma (Subtyping Inversion) . . . . . . . . . . . . . . . . . . . . . . . . . ....
متن کامل